package com.serviceImpl;

import com.dao.ReplyDao;
import com.domain.Reply;
import com.server.ReplyService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service("replyService")
public class ReplyServiceImpl implements ReplyService{

    @Resource(name="replyDao")
    private ReplyDao replyDao;

    @Override
    public List<Reply> selectAllReply() {
        return replyDao.selectAllReply();
    }

    @Override
    public List<Reply> selectReplyByCommentId(int comment_id) {
        return replyDao.selectReplyByCommentId(comment_id);
    }

    @Override
    public int deleteReplyById(int id) {
        return replyDao.deleteReplyById(id);
    }

    @Override
    public int deleteReplyByCommentId(int id) {
        return replyDao.deleteReplyByCommentId(id);
    }

    @Override
    public int addReply(Reply reply) {
        return replyDao.addReply(reply);
    }
}
